import req from '@/http/http'
import config from '@/config/index'
const ZHPQ_SERVER = config.serverUrl()

// 党组织
// 新增栏目
export const createParty = data => {
  let path = ZHPQ_SERVER + '/partyOrg/'
  return req.post(path, data)
}
// 查询列表
export const findParty = data => {
  let path = ZHPQ_SERVER + '/partyOrg'
  return req.get(path, data)
}
// 修改栏目
export const updateParty = data => {
  let path = ZHPQ_SERVER + '/partyOrg/' + data.id
  return req.put(path, data)
}
// 删除栏目
export const deleteParty = data => {
  let path = ZHPQ_SERVER + '/partyOrg/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getParty = id => {
  let path = ZHPQ_SERVER + '/partyOrg/' + id
  return req.get(path)
}

export const getPartyTree = data => {
  let path = ZHPQ_SERVER + '/partyOrg/tree'
  return req.get(path, data)
}

// 班子成员
// 新增栏目
export const createPartyMem = data => {
  let path = ZHPQ_SERVER + '/partyOrgLeader/'
  return req.post(path, data)
}
// 查询列表
export const findPartyMem = data => {
  let path = ZHPQ_SERVER + '/partyOrgLeader'
  return req.get(path, data)
}
// 修改栏目
export const updatePartyMem = data => {
  let path = ZHPQ_SERVER + '/partyOrgLeader/' + data.id
  return req.put(path, data)
}
// 删除栏目
export const deletePartyMem = data => {
  let path = ZHPQ_SERVER + '/partyOrgLeader/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getPartyMem = id => {
  let path = ZHPQ_SERVER + '/partyOrgLeader/' + id
  return req.get(path)
}

// 党建工作信息
// 新增栏目
export const createPartyWork = data => {
  let path = ZHPQ_SERVER + '/partyOrgWork/'
  return req.post(path, data)
}
// 查询列表
export const findPartyWork = data => {
  let path = ZHPQ_SERVER + '/partyOrgWork'
  return req.get(path, data)
}
// 修改党建工作
export const updatePartyWork = data => {
  let path = ZHPQ_SERVER + '/partyOrgWork/' + data.id
  return req.put(path, data)
}
// 删除党建工作
export const deletePartyWork = data => {
  let path = ZHPQ_SERVER + '/partyOrgWork/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getPartyWork = id => {
  let path = ZHPQ_SERVER + '/partyOrgWork/' + id
  return req.get(path)
}

// 换届信息
// 新增栏目
export const createPartyChange = data => {
  let path = ZHPQ_SERVER + '/partyOrgChange/'
  return req.post(path, data)
}
// 查询列表
export const findPartyChange = data => {
  let path = ZHPQ_SERVER + '/partyOrgChange'
  return req.get(path, data)
}
// 修改换届工作
export const updatePartyChange = data => {
  let path = ZHPQ_SERVER + '/partyOrgChange/' + data.id
  return req.put(path, data)
}
// 删除换届工作
export const deletePartyChange = data => {
  let path = ZHPQ_SERVER + '/partyOrgChange/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getPartyChange = id => {
  let path = ZHPQ_SERVER + '/partyOrgChange/' + id
  return req.get(path)
}

// 党员信息
// 新增栏目
export const createPartyer = data => {
  let path = ZHPQ_SERVER + '/partyMember/'
  return req.post(path, data)
}
// 查询列表
export const findPartyer = data => {
  let path = ZHPQ_SERVER + '/partyMember'
  return req.get(path, data)
}
// 修改党员
export const updatePartyer = data => {
  let path = ZHPQ_SERVER + '/partyMember/' + data.id
  return req.put(path, data)
}
// 删除党员
export const deletePartyer = data => {
  let path = ZHPQ_SERVER + '/partyMember/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getPartyer = id => {
  let path = ZHPQ_SERVER + '/partyMember/' + id
  return req.get(path)
}

// 党员奖惩
// 新增栏目
export const createReward = data => {
  let path = ZHPQ_SERVER + '/partyMemberReward/'
  return req.post(path, data)
}
// 查询列表
export const findReward = data => {
  let path = ZHPQ_SERVER + '/partyMemberReward'
  return req.get(path, data)
}
// 修改党员
export const updateReward = data => {
  let path = ZHPQ_SERVER + '/partyMemberReward/' + data.id
  return req.put(path, data)
}
// 删除党员
export const deleteReward = data => {
  let path = ZHPQ_SERVER + '/partyMemberReward/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getReward = id => {
  let path = ZHPQ_SERVER + '/partyMemberReward/' + id
  return req.get(path)
}

// 家庭成员信息
// 新增栏目
export const createHomeMem = data => {
  let path = ZHPQ_SERVER + '/partyMemberHomeMember/'
  return req.post(path, data)
}
// 查询列表
export const findHomeMem = data => {
  let path = ZHPQ_SERVER + '/partyMemberHomeMember'
  return req.get(path, data)
}
// 修改党员
export const updateHomeMem = data => {
  let path = ZHPQ_SERVER + '/partyMemberHomeMember/' + data.id
  return req.put(path, data)
}
// 删除党员
export const deleteHomeMem = data => {
  let path = ZHPQ_SERVER + '/partyMemberHomeMember/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getHomeMem = id => {
  let path = ZHPQ_SERVER + '/partyMemberHomeMember/' + id
  return req.get(path)
}

// 组织转接信息
// 新增栏目
export const createTransfer = data => {
  let path = ZHPQ_SERVER + '/partyMemberTransfer/'
  return req.post(path, data)
}
// 查询列表
export const findTransfer = data => {
  let path = ZHPQ_SERVER + '/partyMemberTransfer'
  return req.get(path, data)
}
// 修改组织转接
export const updateTransfer = data => {
  let path = ZHPQ_SERVER + '/partyMemberTransfer/' + data.id
  return req.put(path, data)
}
// 删除组织转接
export const deleteTransfer = data => {
  let path = ZHPQ_SERVER + '/partyMemberTransfer/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getTransfer = id => {
  let path = ZHPQ_SERVER + '/partyMemberTransfer/' + id
  return req.get(path)
}

// 入党纪念信息
// 新增栏目
export const createAnniver = data => {
  let path = ZHPQ_SERVER + '/partyMemberAnniversary/'
  return req.post(path, data)
}
// 查询列表
export const findAnniver = data => {
  let path = ZHPQ_SERVER + '/partyMemberAnniversary'
  return req.get(path, data)
}
// 修改入党纪念
export const updateAnniver = data => {
  let path = ZHPQ_SERVER + '/partyMemberAnniversary/' + data.id
  return req.put(path, data)
}
// 删除入党纪念
export const deleteAnniver = data => {
  let path = ZHPQ_SERVER + '/partyMemberAnniversary/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getAnniver = id => {
  let path = ZHPQ_SERVER + '/partyMemberAnniversary/' + id
  return req.get(path)
}

// 党史人物
// 新增栏目
export const createHistory = data => {
  let path = ZHPQ_SERVER + '/partyHistoricalFigure/'
  return req.post(path, data)
}
// 查询列表
export const findHistory = data => {
  let path = ZHPQ_SERVER + '/partyHistoricalFigure'
  return req.get(path, data)
}
// 修改入党纪念
export const updateHistory = data => {
  let path = ZHPQ_SERVER + '/partyHistoricalFigure/' + data.id
  return req.put(path, data)
}
// 删除入党纪念
export const deleteHistory = data => {
  let path = ZHPQ_SERVER + '/partyHistoricalFigure/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getHistory = id => {
  let path = ZHPQ_SERVER + '/partyHistoricalFigure/' + id
  return req.get(path)
}

// 三会一课
// 新增三会一课
export const createMeeting = data => {
  let path = ZHPQ_SERVER + '/partyMeetingClass/'
  return req.post(path, data)
}
// 查询列表
export const findMeeting = data => {
  let path = ZHPQ_SERVER + '/partyMeetingClass'
  return req.get(path, data)
}
// 修改三会一课
export const updateMeeting = data => {
  let path = ZHPQ_SERVER + '/partyMeetingClass/' + data.id
  return req.put(path, data)
}
// 删除三会一课
export const deleteMeeting = data => {
  let path = ZHPQ_SERVER + '/partyMeetingClass/' + data.id
  return req.delete(path)
}
// 获取当条详细信息
export const getMeeting = id => {
  let path = ZHPQ_SERVER + '/partyMeetingClass/' + id
  return req.get(path)
}
